<%--
  Created by IntelliJ IDEA.
  Author: Deng PengFei
  Date: 2021/8/14
  Time: 10:45
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>学生毕设管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <%--引入LayUI--%>
    <link href="../../layui/css/layui.css" rel="stylesheet">
    <script src="../../layui/layui.js"></script>
    <script src="../../js/jquery-3.1.0.js"></script>

    <style>
        .myMenu {
            padding-left: 30px;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">

    <%--头部导航栏 导入 head.jsp--%>
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">
            <i class="layui-icon layui-icon-app"></i>
            毕设管理系统
        </div>

        <%--页面信息框导航栏 左边--%>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:void (0);">
                    <i class="layui-icon layui-icon-shrink-right" style="font-size: 20px"></i>
                </a>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:window.location=location;">
                    <i class="layui-icon layui-icon-refresh" style="font-size: 22px"></i>
                </a>
            </li>
        </ul>

        <%--页面信息框导航栏 右边--%>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="../../email.jsp">
                    <i class="layui-icon layui-icon-email" style="font-size: 22px"></i>
                    <span class="layui-badge-dot"></span>
                </a>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="../../message.jsp">
                    <i class="layui-icon layui-icon-notice" style="font-size: 20px"></i>
                    <span class="layui-badge-dot"></span>
                </a>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:void (0);">
                    <i class="layui-icon layui-icon-username"></i>答辩委员会
                </a>
            </li>
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:void (0);">
                    <img src="http://localhost/img/teacher.png" class="layui-nav-img" alt="老师图像">
                    ${sessionScope.userName}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="../../personage.jsp?role=2">个人信息</a></dd>
                    <dd><a href="../../personage.jsp?role=2">修改密码</a></dd>
                    <dd><a href="${pageContext.request.contextPath}/logout">退出</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="${pageContext.request.contextPath}/logout">
                    <i class="layui-icon layui-icon-logout"></i>退出
                </a>
            </li>
        </ul>
    </div>

    <!-- 左侧菜单栏 导入 menu.jsp -->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="Test.test">

                <li class="layui-nav-item">
                    <a href="../role.jsp">
                        <i class="layui-icon layui-icon-home">&nbsp;&nbsp;</i> 多角色选择首页
                    </a>
                </li>


                <li class="layui-nav-item">
                    <a>
                        <i class="layui-icon layui-icon-reply-fill">&nbsp;&nbsp;</i> 信息管理
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="../../message.jsp?role=2"><span class="myMenu">网站公告</span></a></dd>
                        <dd><a href="../../email.jsp?role=2"><span class="myMenu">个人邮件</span></a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item">
                    <a href="grade.jsp">
                        <i class="layui-icon layui-icon-edit">&nbsp;&nbsp;</i> 定稿评分
                    </a>
                </li>


                <li class="layui-nav-item">
                    <%--<a href="index.jsp?page=personage">--%>
                    <a href="../../personage.jsp?role=2">
                        <i class="layui-icon layui-icon-set-fill">&nbsp;&nbsp;</i> 个人设置
                    </a>
                </li>


            </ul>
        </div>
    </div>

    <!-- 内容主体区域 -->
    <div class="layui-body">
        <iframe frameborder="0" style="width: 100%;height: 100%" src="grade.jsp" id="aa"></iframe>

    </div>


    <!-- 底部固定区域 -->
    <%--<div class="layui-footer">


        底部固定区域
    </div>--%>
</div>

</body>

<script>

    /* $(function () {
         let url = '${param.page}';
        alert(url);

        switch (url) {
            case 'studentInfo':
                url = url + '.jsp';
                break;
            case 'message':
                url = '../../' + url + '.jsp';
                break;
            case 'email':
                url = '../../' + url + '.jsp';
                break;
            case 'taskteacher':
                url = url + '.jsp';
                break;
            case 'taskstudent':
                url = url + '.jsp';
                break;
            case 'personage':
                url = '../../' + url + '.jsp';
                break;
            case 'assignment':
                url = url + '.jsp';
                break;
            default:
                return false;
                break;
        }
        $("iframe").attr("src", url);
    });*/


    $(".layui-nav-item a").on('click', function () {
        let address = $(this).attr("href");
        if (address === null || address === "" || address === "../role.jsp" || address === '/logout') {
            return true;
        } else {
            $("iframe").attr("src", address)
            return false;
        }
    });
</script>


</html>
